import $ from "jquery";
import './app2.css';
const $tabBar = $("#app2 .tab-bar");
const $content = $("#app2 .tab-content");
$tabBar.on('click','li',(e)=>{
    const $li = $(e.currentTarget)
    $li.addClass('selected').siblings().removeClass('selected')
    const index = $li.index()
    
    
    $content.children().eq(index).addClass('active')
    .siblings().removeClass('active') //操作css的元素不要用show,hide,css
    console.log(index)
    
})
$tabBar.children().eq(0).trigger('click')